const koa   = require('koa'),
      server = require('koa-static');
const app = koa();

/**
 * server(root, opts)
 *   root: 静态文件路径
 *   opts:
 *     maxage: Browser cache max-age in milliseconds. defaults to 0
 *     hidden: Allow transfer of hidden files. defaults to false
 *     index: Default file name, defaults to 'index.html'
 *     defer: If true, serves after yield next, allowing any downstream middleware to respond first.
 *     gzip: Try to serve the gzipped version of a file automatically when gzip is supported by a client and if the requested file with .gz extension exists. defaults to true.
 */

app.use(server(__dirname + '/asset'));

app.listen(3000);
